﻿using B.S.EventHandle.ErrorCode;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.S.SmartStorPro.Domain
{
    /// <summary>
    /// 采购订单表
    /// </summary>
    public class PurchaseOrders
    {
        /// <summary>
        /// 采购单唯一标识
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int PurchaseOrderlD {  get; set; }
        /// <summary>
        /// 采购订单号
        /// </summary>
        /// 
        [MaxLength(50)]
        public string PurchaseCode {  get; set; }
        /// <summary>
        /// 单据类型--外键
        /// </summary>
        public int DocumentId { get; set; }

        /// <summary>
        /// 联系人姓名
        /// </summary>
        /// 
        [MaxLength(50)]
        public string ContactPerson { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        /// 
        [MaxLength(50)]
        public string ContactPhone { get; set; }
        /// <summary>
        /// 收货日期
        /// </summary>
        public DateTime? DeliveryDate { get; set; }

        /// <summary>
        /// 制单人名称
        /// </summary>
        [MaxLength(50)]
        public string CreatorUserName { get; set; }
        /// <summary>
        /// 制单时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        /// 
        [MaxLength(255)]
        public string Remarks { get; set; }

        /// <summary>
        /// 供应商ID--外键
        /// </summary>
        public int Supplierld { get; set; }
        /// <summary>
        /// 客户ID --外键
        /// </summary>
        public int Customerld { get; set; }
        /// <summary>
        /// 订单日期
        /// </summary>
        public DateTime OrderDate { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public PurchaseOrderStatus Status { get; set; }
        /// <summary>
        /// 是否删除(1-删除 0正常)
        /// </summary>
        public bool IsDelete { get; set; }


    }
}
